home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -in_the_mag- / multitasking / coders / ppipc / ipc_lib_sources / libtables.c < prev    next >
C/C++ Source or Header  |  2000-03-05  |  2KB  |  85 lines

  1. /* IPC Library Initialization tables in C format 89:4:17 */
  2. /* should be compiled with the -b0 option to avoid merging */
  3.  
  4. #include <exec/types.h>
  5. #include <exec/libraries.h>
  6.  
  7. #define LIBPOSSIZE (sizeof(struct Library))
  8. /*      ^^^ adjust to take into account any reserved data area */
  9. /*          (none at the moment -- data kept in global storage) */
  10.  
  11. char libName[] = "ppipc.library";
  12. char libId[] = "PPIPC version 2.2 89:04:17\n";
  13.  
  14. /* These can be used by libInitFunc to reset values in Node: */
  15. UWORD   libVersion = 2;
  16. UWORD   libRev = 2;
  17.  
  18. /*** Note that it may not be possible to keep libVersion/libRev in sync with
  19.     the "release" version (in e.g. libId and IPC.h), as libVersion must be
  20.     incremented each time a new function is added to a release, for example.
  21.     (As far as I know, libRev is not accessed by the system.) ***/
  22.  
  23. extern libOpen(), libClose(), libExpunge(), libExtFunc();
  24.  
  25. extern  FindIPCPort(),
  26.         GetIPCPort(),
  27.         UseIPCPort(),
  28.         DropIPCPort(),
  29.         ServeIPCPort(),
  30.         ShutIPCPort(),
  31.         LeaveIPCPort(),
  32.         CheckIPCPort(),
  33.         PutIPCMsg(),
  34.         CreateIPCMsg(),
  35.         DeleteIPCMsg(),
  36.         LoadIPCPort();
  37.         MakeIPCId();
  38.         FindIPCItem();
  39.  
  40.  
  41.  
  42.  
  43. ULONG * FuncTable[] = {
  44.         ((ULONG *)&libOpen),
  45.         ((ULONG *)&libClose),
  46.         ((ULONG *)&libExpunge),
  47.         ((ULONG *)&libExtFunc),
  48.  
  49.         ((ULONG *)&FindIPCPort),
  50.         ((ULONG *)&GetIPCPort),
  51.         ((ULONG *)&UseIPCPort),
  52.         ((ULONG *)&DropIPCPort),
  53.         ((ULONG *)&ServeIPCPort),
  54.         ((ULONG *)&ShutIPCPort),
  55.         ((ULONG *)&LeaveIPCPort),
  56.         ((ULONG *)&CheckIPCPort),
  57.         ((ULONG *)&PutIPCMsg),
  58.         ((ULONG *)&CreateIPCMsg),
  59.         ((ULONG *)&DeleteIPCMsg),
  60.         ((ULONG *)&LoadIPCPort),
  61.         ((ULONG *)&MakeIPCId),
  62.         ((ULONG *)&FindIPCItem),
  63.     /* Spare slots kept open to avoid accidents: */
  64.         ((ULONG *)&libExtFunc),
  65.         ((ULONG *)&libExtFunc),
  66.         ((ULONG *)&libExtFunc),
  67.         ((ULONG *)&libExtFunc),
  68.         (ULONG *)0xFFFFFFFF
  69.     };
  70.  
  71. extern DataTable[];     /* in LibTag.a -- Assembly is more convenient here */
  72. extern libInitFunc();
  73.  
  74. ULONG * libInitTable[] = {
  75.         (ULONG *)LIBPOSSIZE,
  76.         (ULONG *)&FuncTable,
  77.         (ULONG *)&DataTable,
  78.         (ULONG *)&libInitFunc
  79.     };
  80.  
  81.  
  82. ULONG libSize = LIBPOSSIZE; /* for testing convenience */
  83.  
  84.  
  85.